package org.xiaov.lunasql.spring.mybatis;

/**
 * <p>
 * MyBatisTransformHolder
 * </p>
 *
 * @author lzq
 * @since 2024/12/26 20:01
 */
public class MyBatisTransformHolder {

    private static final ThreadLocal<Boolean> isTransform = new ThreadLocal<>();

    /**
     * 设置是否转换
     *
     * @param transform boolean
     */
    public static void set(boolean transform) {
        isTransform.set(transform);
    }

    /**
     * 获取是否转换
     *
     * @return boolean
     */
    public static boolean get() {
        return isTransform.get();
    }

    /**
     * 清除线程变量
     */
    public static void remove() {
        isTransform.remove();
    }

}
